<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require '../com.swiss.mooh.dao.impl/FileDaoImpl.php';
require '../com.swiss.mooh.service/FileContentServiceImpl.php';


$conf = parse_ini_file("../../model-db-connection/configuration.ini");
$dispatcher = new FileDaoImpl();
$fileContentService = new FileContentServiceImpl($dispatcher);
$descID = $_POST['descID'];
$listOfFileVO = $fileContentService->getAllFileContentByDescID($descID);
for ($i = 0; $i < $listOfFileVO->Size(); $i++) {
    ?>
    <a href="#" class="list-group-item">   
        <span class="badge" onclick="getLink('<?= $conf['applicationFileServerPath'] ?><?= $listOfFileVO->GetObj($i)->getFileName(); ?>')"><i class="fa fa-link"></i></span>
        <span class="badge" onclick="deleteFileByName2('<?= $listOfFileVO->GetObj($i)->getFileName(); ?>', '<?= $descID ?>')"><i class="fa fa-trash"></i></span>
        <span><i class="fa fa-fw fa-calendar"></i> <?= $listOfFileVO->GetObj($i)->getFileName(); ?></span>
    </a>
    <?php
}